package day10;

public class Demo {
    public static void main(String[] args) {
//        String a = "hello2";
//        String b = "hello";
//        String c = b+2;//常量池地址+2 拼接在一起的新常量
//        System.out.println(a==c);//

//        String a= "hello2";
//        final String b = "hello";
//        String c=b+2;
//        System.out.println(a==c);

        String a = "hello";
        final String b = get();
        String c=b+2;
        System.out.println(a==c);
    }

    public static String get() {
        return "hello";
    }
}
